import {defineStore} from 'pinia'
import {ref} from 'vue'
import persist from "pinia-plugin-persistedstate";

export const useUserStore = defineStore(
    'shop-user',
    () => {
        const user = ref({})

        const setUser = async (obj) => {
            user.value = obj
        }

        return {
            user,
            setUser
        }
    }, {
        persist
    }
)
